package com.cysd.ewmksbs.ksb_ui.dialog;

import android.animation.AnimatorSet;
import android.content.Context;
import android.view.View;
import android.widget.Button;

import androidx.annotation.NonNull;

import com.csylhl.ewmksb.R;


public class NoNetWorkDialog extends BaseDialog {
    private Context mContent;
    private Button btn_close;
    public noNetworkDialogListner noNetworkDialogListner;
    public NoNetWorkDialog(@NonNull Context context) {
        super(context);
        this.mContent = context;
    }

    @Override
    protected float setWidthScale() {
        return 0.8f;
    }

    @Override
    protected AnimatorSet setEnterAnim() {
        return null;
    }

    @Override
    protected AnimatorSet setExitAnim() {
        return null;
    }

    @Override
    protected void init() {
      btn_close=findViewById(R.id.btn_close);

       btn_close.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();
                noNetworkDialogListner.NoNet();
            }
        });
    }

    @Override
    protected int getContentViewId() {
        return R.layout.no_network_dialog;
    }


    public void setOnDissmissListener(noNetworkDialogListner listener) {
        this.noNetworkDialogListner = listener;
    }
    public interface noNetworkDialogListner {
        void NoNet();
    }
}
